TypeScript 55.4%
Python 43.2%
SQL 1.2%
1import { notFound } from "next/navigation";2import type { ReactNode } from "react";3import { api } from "@/lib/api";45/**6 * Existence check outside the `loading.tsx` boundary so unknown source ids return a real 404 instead of a7 * 200 shell followed by the not-found UI (the page's own call is deduplicated by fetch memoization).8 */9export default async function SourceLayout({ params, children }: { params: Promise<{ id: string }>; children: ReactNode }) {10 const { id } = await params;11 if (!(await api.source(id))) notFound();12 return children;13}14